.class public Lcom/nemustech/regina/WorkspaceBrowserHolder;
.super Lcom/nemustech/tiffany/world/TFCoverFlow;
.source "WorkspaceBrowserHolder.java"


# instance fields
.field protected mDepth:F


# direct methods
.method public constructor <init>(FF)V
    .locals 2
    .parameter "length"
    .parameter "depth"

    .prologue
    const/4 v1, 0x0

    .line 14
    invoke-direct {p0, p1}, Lcom/nemustech/tiffany/world/TFCoverFlow;-><init>(F)V

    .line 15
    iput p2, p0, Lcom/nemustech/regina/WorkspaceBrowserHolder;->mDepth:F

    .line 16
    invoke-virtual {p0, v1}, Lcom/nemustech/regina/WorkspaceBrowserHolder;->setTerminalHolder(Z)V

    .line 17
    const/high16 v0, 0x4234

    invoke-virtual {p0, v0}, Lcom/nemustech/regina/WorkspaceBrowserHolder;->setLeaningAngle(F)V

    .line 18
    invoke-virtual {p0}, Lcom/nemustech/regina/WorkspaceBrowserHolder;->getMoveAnimation()Lcom/nemustech/tiffany/world/TFSimpleHolder$SimpleMoveAnimation;

    move-result-object v0

    invoke-virtual {v0, v1}, Lcom/nemustech/tiffany/world/TFSimpleHolder$SimpleMoveAnimation;->setAutoRepositionMode(Z)V

    .line 19
    const/4 v0, 0x1

    invoke-virtual {p0, v0}, Lcom/nemustech/regina/WorkspaceBrowserHolder;->setPriorAxis(I)V

    .line 20
    return-void
.end method


# virtual methods
.method protected getModelPosition(I)F
    .locals 3
    .parameter "modelIndex"

    .prologue
    .line 97
    invoke-virtual {p0}, Lcom/nemustech/regina/WorkspaceBrowserHolder;->getHeadSlotIndex()I

    move-result v1

    sub-int v1, p1, v1

    int-to-float v1, v1

    invoke-virtual {p0}, Lcom/nemustech/regina/WorkspaceBrowserHolder;->getSlotCount()I

    move-result v2

    int-to-float v2, v2

    div-float v0, v1, v2

    .line 98
    .local v0, position:F
    return v0
.end method

.method protected locateObject(Lcom/nemustech/tiffany/world/TFObject;)V
    .locals 0
    .parameter "object"

    .prologue
    .line 91
    return-void
.end method

.method protected locateObject(Lcom/nemustech/tiffany/world/TFObject;FI)V
    .locals 19
    .parameter "object"
    .parameter "modelPosition"
    .parameter "modelIndex"

    .prologue
    .line 47
    const v11, 0x3dcccccd

    .line 48
    .local v11, r:F
    const v10, 0x3f4ccccd

    .line 49
    .local v10, p:F
    invoke-virtual/range {p0 .. p0}, Lcom/nemustech/regina/WorkspaceBrowserHolder;->getLength()F

    move-result v6

    .line 50
    .local v6, l:F
    invoke-virtual/range {p0 .. p0}, Lcom/nemustech/regina/WorkspaceBrowserHolder;->getSlotCount()I

    move-result v15

    int-to-float v9, v15

    .line 51
    .local v9, n:F
    const/high16 v15, 0x3f80

    const v16, 0x3fcccccd

    add-float v16, v16, v9

    div-float v14, v15, v16

    .line 52
    .local v14, x:F
    const/high16 v15, 0x3f80

    div-float v12, v15, v9

    .line 53
    .local v12, v:F
    const/high16 v15, 0x3f80

    const v16, 0x3f99999a

    mul-float v16, v16, v12

    sub-float v15, v15, v16

    const/high16 v16, 0x3f80

    sub-float v16, v9, v16

    div-float v13, v15, v16

    .line 54
    .local v13, w:F
    invoke-static/range {p2 .. p2}, Ljava/lang/Math;->abs(F)F

    move-result v8

    .line 58
    .local v8, m:F
    invoke-virtual/range {p0 .. p0}, Lcom/nemustech/regina/WorkspaceBrowserHolder;->getLeaningAngle()F

    move-result v15

    const/high16 v16, 0x3fc0

    mul-float v7, v15, v16

    .line 59
    .local v7, leaningAngle:F
    const/4 v4, 0x0

    .line 62
    .local v4, ax:F
    invoke-virtual/range {p0 .. p0}, Lcom/nemustech/regina/WorkspaceBrowserHolder;->getHeadSlotIndex()I

    move-result v15

    move/from16 v0, p3

    move v1, v15

    if-ne v0, v1, :cond_1

    .line 63
    mul-float v15, v8, v14

    div-float v5, v15, v12

    .line 64
    .local v5, d:F
    const/4 v4, 0x0

    .line 79
    :goto_0
    const/4 v15, 0x0

    cmpg-float v15, p2, v15

    if-gez v15, :cond_0

    .line 80
    const/high16 v15, -0x4080

    mul-float/2addr v5, v15

    .line 81
    const/high16 v15, -0x4080

    mul-float/2addr v4, v15

    .line 84
    :cond_0
    mul-float v15, v5, v6

    const/16 v16, 0x0

    move-object/from16 v0, p0

    iget v0, v0, Lcom/nemustech/regina/WorkspaceBrowserHolder;->mDepth:F

    move/from16 v17, v0

    mul-float v17, v17, v5

    const v18, 0x3f99999a

    mul-float v17, v17, v18

    const/16 v18, 0x0

    cmpg-float v18, v5, v18

    if-gez v18, :cond_4

    const/16 v18, 0x1

    :goto_1
    move/from16 v0, v18

    int-to-float v0, v0

    move/from16 v18, v0

    mul-float v17, v17, v18

    move-object/from16 v0, p1

    move v1, v15

    move/from16 v2, v16

    move/from16 v3, v17

    invoke-virtual {v0, v1, v2, v3}, Lcom/nemustech/tiffany/world/TFObject;->locate(FFF)V

    .line 85
    const/4 v15, 0x0

    move-object/from16 v0, p1

    move v1, v4

    move v2, v15

    invoke-virtual {v0, v1, v2}, Lcom/nemustech/tiffany/world/TFObject;->look(FF)V

    .line 87
    invoke-virtual/range {p0 .. p1}, Lcom/nemustech/regina/WorkspaceBrowserHolder;->locateObject(Lcom/nemustech/tiffany/world/TFObject;)V

    .line 89
    return-void

    .line 67
    .end local v5           #d:F
    :cond_1
    const v15, 0x3dcccccd

    mul-float/2addr v15, v12

    const/high16 v16, 0x4000

    div-float v16, v12, v16

    add-float v15, v15, v16

    cmpg-float v15, v8, v15

    if-gtz v15, :cond_2

    .line 68
    const/high16 v15, 0x4000

    div-float v15, v14, v15

    const/high16 v16, 0x4000

    div-float v16, v12, v16

    sub-float v16, v8, v16

    const v17, 0x3f4ccccd

    mul-float v16, v16, v17

    mul-float v16, v16, v14

    const v17, 0x3dcccccd

    mul-float v17, v17, v12

    div-float v16, v16, v17

    add-float v5, v15, v16

    .line 69
    .restart local v5       #d:F
    neg-float v15, v7

    const/high16 v16, 0x3f00

    mul-float v15, v15, v16

    const/high16 v16, 0x4000

    div-float v16, v12, v16

    sub-float v16, v8, v16

    mul-float v15, v15, v16

    const v16, 0x3dcccccd

    mul-float v16, v16, v12

    div-float v4, v15, v16

    goto :goto_0

    .line 72
    .end local v5           #d:F
    :cond_2
    const v15, 0x3dcccccd

    mul-float/2addr v15, v12

    const/high16 v16, 0x4000

    div-float v16, v12, v16

    add-float v15, v15, v16

    sub-float v15, v8, v15

    mul-float/2addr v15, v14

    div-float/2addr v15, v13

    const/high16 v16, 0x4000

    div-float v16, v14, v16

    add-float v15, v15, v16

    const v16, 0x3f4ccccd

    mul-float v16, v16, v14

    add-float v5, v15, v16

    .line 73
    .restart local v5       #d:F
    const/high16 v15, 0x4000

    div-float v15, v12, v15

    const v16, 0x3dcccccd

    mul-float v16, v16, v12

    add-float v15, v15, v16

    add-float/2addr v15, v13

    cmpl-float v15, v8, v15

    if-lez v15, :cond_3

    .line 74
    neg-float v4, v7

    goto/16 :goto_0

    .line 76
    :cond_3
    neg-float v15, v7

    const/high16 v16, 0x3f00

    mul-float v15, v15, v16

    div-float v16, v8, v13

    const/high16 v17, 0x3f80

    add-float v16, v16, v17

    const/high16 v17, 0x4000

    div-float v17, v12, v17

    const v18, 0x3dcccccd

    mul-float v18, v18, v12

    add-float v17, v17, v18

    div-float v17, v17, v13

    sub-float v16, v16, v17

    mul-float v4, v15, v16

    goto/16 :goto_0

    .line 84
    :cond_4
    const/16 v18, -0x1

    goto/16 :goto_1
.end method
